package com.ysh.service.impl;

import com.ysh.dao.UserDao;
import com.ysh.dao.impl.UserDaoImpl;
import com.ysh.domain.Student;
import com.ysh.domain.User;
import com.ysh.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    // 创建Dao层对象
    UserDao userDao = new UserDaoImpl();

    @Override
    public User login(String username, String pwd) {
        return userDao.findByUsernameAndPwd(username,pwd);
    }

    @Override
    public List<Student> findAll() {
        return userDao.findAll();
    }
}
